package com.worldtolearn.order.entity;

import javax.inject.Named;

@Named
public class OrderLine {
	
	private double totalCost;
	private double offerCost;
	private int qty =1;
	private int idOfferLine;
	private int idOrderLine;
	private String label;
	
	boolean editable;
	
	public boolean isEditable() {
		return editable;
	}
	public void setEditable(boolean editable) {
		this.editable = editable;
	}
	
	public double getTotalCost() {
		
		return getQty() * getOfferCost();
	}
	public void setTotalCost(double totalCost) {
		this.totalCost = totalCost;
	}
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
	public int getIdOfferLine() {
		return idOfferLine;
	}
	public void setIdOfferLine(int idOffer) {
		this.idOfferLine = idOffer;
	}
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}
	@Override
	public String toString() {
		return "OrderLine [totalCost=" + totalCost + ", qty=" + qty
				+ ", idOffer=" + idOfferLine + ", label=" + label + "]";
	}
	public double getOfferCost() {
		return offerCost;
	}
	public void setOfferCost(double d) {
		this.offerCost = d;
	}
	public int getIdOrderLine() {
		return idOrderLine;
	}
	public void setIdOrderLine(int idOrderLine) {
		this.idOrderLine = idOrderLine;
	}
	
}
